
#ifndef ROPUFU_DISTRIBUTED_TRIVIAL_GRID_HPP_INCLUDED
#define ROPUFU_DISTRIBUTED_TRIVIAL_GRID_HPP_INCLUDED

#include <cstdint>

namespace ropufu
{
    namespace distributed
    {
        struct trivial_grid
        {
            static trivial_grid get()
            {
                return trivial_grid();
            }

            bool is_master() const
            {
                return true;
            }

            void barrier() const
            {
            }

            std::int32_t row_local_to_global(std::int32_t local_row) const
            {
                return local_row;
            }

            std::int32_t column_local_to_global(std::int32_t local_column) const
            {
                return local_column;
            }

            std::int32_t row_global_to_local(std::int32_t global_row) const
            {
                return global_row;
            }

            std::int32_t column_global_to_local(std::int32_t global_column) const
            {
                return global_column;
            }
        };
    }
}

#endif // ROPUFU_DISTRIBUTED_TRIVIAL_GRID_HPP_INCLUDED
